package didi.hcp.questionrobot.common;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class Answer {

    private String text;

    private List<Message> data = new CopyOnWriteArrayList<>();

    public List<Message> appendMsg(Message message){
        this.data.add(message);
        return this.data;
    }

}
